<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>空间视距</title>
  <style>
    .father {
      /* 视距属性必须添加给直接父级, 范围(800px-1000px) */
      /* 视距可以用来设置人眼到电脑平面之间的距离, 近大远小 */
      perspective: 1000px;
    }
    .son {
      width: 200px;
      height: 200px;
      margin: 100px auto;
      background-color: pink;
      transition: all .5s;
    }
    .son:hover {
      transform: translateZ(-300px);
    }
  </style>
</head>
<body>
  <div class="father">
    <div class="son"></div>
  </div>
</body>
</html>